#exam5.1printTian.py
#打印田字格
def printTian(n):
    line = 3*n+1
    for i in range(1,line+1):
        if i%3==1:
            print(n*"+----", end="")
            print("+")
        else:
            print(n*"|    ", end="")
            print("|")
def main():
    n = eval(input("请输入n的值:"))
    printTian(n)
main()